/**
 *
 */
package com.angel.mocks.daos.impl;

import java.io.Serializable;
import java.util.Collection;

import org.hibernate.criterion.Restrictions;

import com.angel.dao.generic.impl.GenericHibernateDAO;
import com.angel.mocks.dao.generic.Exam;
import com.angel.mocks.dao.generic.Person;
import com.angel.mocks.daos.ExamDAO;

/**
 * @author William
 *
 */
public class ExamDAOHibernate extends GenericHibernateDAO<Exam, Serializable> implements ExamDAO{


	public Exam findUniqueBy(Integer note, Person person) {
		return (Exam) super.findAllByCriteria(Restrictions.eq("note", note), Restrictions.eq("person", person));
	}


	public Collection<Exam> findAllBy(Person person) {
		return super.findAllByCriteria(Restrictions.eq("person", person));
	}
}
